package com.ruoyi.wx.mapper;

import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.wx.domain.PtExp;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.wx.domain.dto.IndexPtExpDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author moxiu
 * @since 2021-11-13
 */
public interface PtExpMapper extends BaseMapper<PtExp> {

    List<SysDept> selectClassList();

	/**
	 * 查询改实验拥有的视频数量
	 * @param expId 实验id
	 * @return 总数
	 */
	@Select("SELECT exp_video_num FROM pt_exp WHERE exp_id = #{expId}")
	int selectVideoSum(@Param("expId") Long expId);

	IndexPtExpDTO selectIndePtExpList(@Param("expId")Long expId,@Param("userId") Long userId);

}
